﻿using SqlSugar;
using System.ComponentModel.DataAnnotations.Schema;

namespace XinLife.Model
{
    /// <summary>
    /// 模块功能表
    /// </summary>
    [Table("tb_module")]
    [SugarTable("tb_module")]
    public class Module : BaseModel
    {
        //  public Module()
        //  {
        //this.ChildModule = new List<Module>();
        //this.ModulePermission = new List<ModulePermission>();
        //this.RoleModulePermission = new List<RoleModulePermission>();
        // }

        /// <summary>
        /// 父ID
        /// </summary>
        public string cParentId { get; set; }
        /// <summary>
        /// 标题
        /// </summary>
        public string cTitle { get; set; }
        /// <summary>
        /// 名称
        /// </summary>
        public string cName { get; set; }
        /// <summary>
        /// 菜单链接地址
        /// </summary>
        public string cPath { get; set; }
        /// <summary>
        /// 图标
        /// </summary>
        public string cIcon { get; set; }
        /// <summary>
        /// 菜单编号
        /// </summary>
        public string cCode { get; set; }
        /// <summary>
        /// 排序
        /// </summary>
        public int cSortCode { get; set; }
        /// <summary>
        /// /描述
        /// </summary>
        public string cDescription { get; set; }
        /// <summary>
        /// 是否是菜单
        /// </summary>
        public int cIsMenu { get; set; }
        /// <summary>
        /// 是否激活
        /// </summary>
        public bool cEnabled { get; set; }

        [SugarColumn(IsIgnore = true)]
        public virtual string[] buttons { get; set; }

        [SugarColumn(IsIgnore = true)]
        public virtual List<ModuleButton> ModuleButtons { get; set; }
    }
}
